Converts any string or numeric expression to a long integer.
文字列および数値表式を、ロング整数の数値データに変換します。
CLng (Expression)
CLng (Expression)
Long
ロング整数
Expression: Any numerical expression that you want to convert. If the Expression lies outside the valid long integer range between -2.147.483.648 and 2.147.483.647, Office Basic returns an overflow error. To convert a string expression, the number must be entered as normal text ("123.5") using the default number format of your operating system.
Expression: 変換させる数値表式。Expression がロング整数で扱える -2,147,483,648 から 2,147,483,647 の範囲に収まらない場合、Office Basic はオーバーフローエラーを出します。また文字列を変換する場合は、オペレーティングシステムが標準で使用する数の書式 (「123.5」など) でテキストを指定する必要があります。
This function always rounds the fractional part of a number to the nearest integer.
この関数で小数を変換すると、常に数値の小数部を丸めた整数値が返されます。
Sub ExampleCountryConvert
Sub ExampleCountryConvert
Msgbox CDbl(1234.5678)
Msgbox CDbl(1234.5678)
Msgbox CInt(1234.5678)
Msgbox CInt(1234.5678)
Msgbox CLng(1234.5678)
Msgbox CLng(1234.5678)
end sub
end sub